package m;

/**
 *
 * @author !gaso
 */
public class JXTableModel extends Model {
    
    public Object[] datosTabla(String... values){
        Object[] dataGrid = new Object[2];
        
        //values[0] = values[0]+",Consultar,Modificar,Eliminar";
        
        dataGrid[0] =  values[0].trim().split(",");
        dataGrid[1] = sqlDatos(values[1]);
        
        return dataGrid;
    }
    
    private Object[] descCampos(String sql){
        Object[][] nombreColumnas = sqlDatos(sql);
        String d = "";
        for( int n = 0; n < nombreColumnas.length; n++) {
            d += nombreColumnas[ n ][ 1 ].toString().substring(0, n) + ",";
        }
        return d.split(",");
        
    }
}
